Prv8 Shell
Server : Apache
System : Linux server.mata-lashes.com 3.10.0-1160.90.1.el7.x86_64 #1 SMP Thu May 4 15:21:22 UTC 2023 x86_64
User : matalashes ( 1004)
PHP Version : 8.1.29
Disable Function : NONE
Directory :  /home/matalashes/.trash/app/Views/admin/pages/custom/pembelian/pembelianfaktur/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : /home/matalashes/.trash/app/Views/admin/pages/custom/pembelian/pembelianfaktur/pembelianfaktur.php
<?= $this->extend('admin/layout/admin_datatable_transaksi') ?>
<?= $this->section('content') ?>
    <!-- ============================================================== -->
    <!-- Page Content -->
    <!-- ============================================================== -->

    <!-- ============================================================== -->
    <!-- Different data widgets -->
    <!-- ============================================================== -->
<?php
$session = service('session');
echo form_content_table_tag_open('table', 'table align-middle table-row-dashed fs-6 gy-5', '', $session->get('trash')) ?>
    <thead>
    <tr class="text-start text-muted fw-bolder fs-7 text-uppercase gs-0">
        <th hidden>ID</th>
        <th>Tgl</th>
        <th>No Faktur</th>
        <th>Supplier</th>
        <th>Metode Bayar</th>
        <th>Tempo</th>
        <th>Total</th>
        <th>Status</th>
        <th>Status Bayar</th>
        <th class="text-end">#</th>
    </tr>
    </thead>
    <tbody class="text-gray-600 fw-bold">    
        <?php
    foreach ($_data as $d) {
        $kurangbayar = $d->pf_amount-$d->pf_jml_bayar;
        ?>
        <tr>
            <td hidden><?= $d->pf_id ?></td>
            <td><?= date("d M Y H:i", strtotime($d->created_at ?? '')) ?></td>
            <td><?= $d->pf_no ?></td>
            <td>
                <?= $d->pf_penjual ?>
            </td>
            <td><?= $d->pf_metode_bayar ?></td>
            <td>
                <?php if($d->pf_tempo != NULL){ ?>
                <?= date("d M Y", strtotime($d->pf_tempo ?? '')) ?>
                <?php } ?>
                    
            </td>
            <td><?= 'Rp '.number_format($d->pf_amount, 0, ',', '.') ?></td>
            <td>
                <?php
                    $st = '<span class="badge badge-light-danger">Draft</span>';
                    if($d->pf_status!=0){
                        $st = '<span class="badge badge-light-success">Posted</span>';
                    }
                     echo $st;
                ?>   
            </td>
            <td>
                <?php
                    $st = '<span class="badge badge-light-danger">Belum Lunas</span>';
                    if($d->pf_status_bayar!=0){
                        $st = '<span class="badge badge-light-success">Lunas</span>';
                    }
                     echo $st;
                ?>   
            </td>
            <td>
                <?php if($d->pf_status_bayar == 0){ ?>
                    <?php if($d->pf_status == 0){ ?>
                        <?= action_button_table_faktur_pembelian(\Config\Services::session()->get('trash'), $url_action_table, $myLib->secure_id($d->pf_id),$d->pf_id) ?>
                    <?php }else{ ?>
                        <?= action_button_table_faktur_pembelian_posted(\Config\Services::session()->get('trash'), $url_action_table, $myLib->secure_id($d->pf_id),$d->pf_id,$kurangbayar,$d->pf_metode_bayar) ?>
                    <?php } ?>
                <?php }else{ ?>
                        <?= action_button_table_faktur_pembelian_completed(\Config\Services::session()->get('trash'), $url_action_table, $myLib->secure_id($d->pf_id)) ?>
                <?php } ?>
            </td>
        </tr>
        <?php
    }
    ?>
    </tbody>
    <tfoot>
    <tr>
        <th hidden>&nbsp;</th>
        <th>&nbsp;</th>
        <th class="searchable">No Faktur</th>
        <th class="searchable">Supplier</th>
        <th class="searchable">Metode Bayar</th>
        <th class="searchable">Tempo</th>
        <th class="searchable">Total</th>
        <th class="searchable">Status</th>
        <th class="searchable">Status Bayar</th>
        <th>&nbsp;</th>
    </tr>
    </tfoot>
<?= form_content_table_tag_close(); ?>
<div class="modal fade" id="modalBayar" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
    <div class="modal-dialog modal-dialog-centered" role="document">
        <div class="modal-content">
            <div class="modal-header">
                <h5 class="modal-title" id="myModalLabel">Pembayaran Faktur</h5>
                <button type="button" class="btn btn-sm btn-secondary" onclick="closeModal()" aria-label="Close">
                    <span aria-hidden="true">&times;</span>
                </button>
            </div>
            <div class="modal-body">
                <div class="mb-3">
                    <h5>Tgl Pembayaran</h5>
                    <?= input_field('pf_tgl_bayar', 'form-control form-control-sm', 'pf_tgl_bayar', 'date', 'Tgl Pembayaran', date('Y-m-d'), ''); ?>
                </div>
                <div class="mb-3">
                    <h5>Metode Bayar</h5>
                      <select class="form-control form-control-sm" onchange="checkMetode()" name="pf_metode_bayar" id="pf_metode_bayar">
                        <?php
                          $pos = array(array("pf_metode_bayar" => "CASH", "value" => "CASH"), array("pf_metode_bayar" => "TEMPO", "value" => "TEMPO"));
                          foreach ($pos as $d) {
                        ?>
                        <option value="<?= $d['pf_metode_bayar'] ?>"><?= $d['value'] ?></option>
                        <?php } ?>
                      </select>
                </div>
                <div class="mb-3" id="divTempo" style="display: none;">
                    <h5>Tempo</h5>
                    <?= input_field('pf_tempo', 'form-control form-control-sm', 'pf_tempo', 'date', 'Jatuh Tempo', '', ''); ?>
                </div>
                <div class="mb-3">
                    <h5>Jml Bayar</h5>
                    <?= input_field('pf_jml_bayar', 'form-control form-control-sm', 'pf_jml_bayar', 'number', 'Jml Bayar', '', 'readonly'); ?>
                </div>
            </div>
            <input hidden name="id" id="id">
            <div class="modal-footer">
                <a type="submit" id="bayar_faktur_pembelian" class="btn btn-primary">Bayar</a>
            </div>
        </div>
    </div>
</div>

<div class="modal fade" id="modalBayarHutang" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
    <div class="modal-dialog modal-dialog-centered" role="document">
        <div class="modal-content">
            <div class="modal-header">
                <h5 class="modal-title" id="myModalLabel">Pelunasan Faktur</h5>
                <button type="button" class="btn btn-sm btn-secondary" onclick="closeModal2()" aria-label="Close">
                    <span aria-hidden="true">&times;</span>
                </button>
            </div>
            <div class="modal-body">
                <div class="mb-3">
                    <h5>Tgl Pembayaran</h5>
                    <?= input_field('pf_tgl_bayar_sisa', 'form-control form-control-sm', 'pf_tgl_bayar_sisa', 'date', 'Tgl Pembayaran', date('Y-m-d'), ''); ?>
                </div>
                <div class="mb-3">
                    <h5>Jml Bayar</h5>
                    <?= input_field('pf_jml_bayar_sisa', 'form-control form-control-sm', 'pf_jml_bayar_sisa', 'number', 'Jml Bayar', '', 'readonly'); ?>
                </div>
            </div>
            <div class="modal-footer">
                <a type="submit" id="pelunasan_faktur_pembelian" class="btn btn-primary">Bayar</a>
            </div>
        </div>
    </div>
</div>
    <!-- End Page Content -->
    <!-- ============================================================== -->
<?= $this->endSection('content') ?>

haha - 2025